package com.example.activitytest;

import org.json.JSONException;
import org.json.JSONObject;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.LinearLayout;

import com.sin.android.database.AssetsDatabaseManager;
import com.sin.android.ui.SinTextView;
import com.sin.android.utils.SinUtil;

public class ActivityA extends Activity {
	
	protected static final String tag = "ActivityA";
	
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Log.i(tag, "onCreate");
        setContentView(R.layout.main);
        
        try {
        	String json = "{\"status\":0,\"msg\":\"\\u95ee\\u9898\\u5df2\\u6210\\u529f\\u5904\\u7406\\uff0c\\u975e\\u5e38\\u611f\\u8c22\\uff01\"}";
        	JSONObject j = new JSONObject(json);
			Log.i(tag, j.getString("msg"));
			((SinTextView) findViewById(R.id.txt)).setText(j.getString("msg"));
		}
		catch (JSONException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
    }
}
